package designpattern.demo.creational.builderpattern.director;

import designpattern.demo.creational.builderpattern.builder.Builder;
import designpattern.demo.creational.builderpattern.builder.ConcreteProductBuilder;
import designpattern.demo.creational.builderpattern.product.Product;

public class Director {
    private Builder builder = new ConcreteProductBuilder();
    //构建不同的产品
    public Product getAProduct(){
        builder.setPart();
        /*
         * 设置不同的零件，产生不同的产品
         */
        return builder.buildProduct();
    }
}